import 'package:flutter/material.dart';
import '../tabs.dart';

class RegisterSecond extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('注册页面2'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            Text('这里是注册页面2'),
            RaisedButton(
              child: Text('立即注册'),
              onPressed: () {
                // 返回跟路由
                Navigator.of(context).pushAndRemoveUntil(
                    new MaterialPageRoute(builder: (context) => new Tabs(index: 2)),
                    (route) => route == null
                );
              },
            )
          ],
        ),
      ),
    );
  }
}